package com.atguigu.gmall.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FirstController {
    //    通过requestMapping匹配请求并交给方法处理
    @RequestMapping("testDemo")
    public String test(
            @RequestParam(value = "aa",defaultValue = "zhangsan") String username,
            @RequestParam(value = "bb",defaultValue = "000000") int age) {

        System.out.println(username+ "\t" + age);
        return "success";
    }


}
